﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using 学习养成计划.Common;
using 学习养成计划.Model;

namespace 学习养成计划.ViewModel
{
    public class LoginViewModel
    {
        public LoginModel LoginModel { get; set; }
        public CommandBase CloseWindowCommand { get; set; }

        public LoginViewModel()
        {
            this.LoginModel = new LoginModel();
            this.LoginModel.UserName = "Volcano";
            this.CloseWindowCommand = new CommandBase();
            this.CloseWindowCommand.DoExecute = new Action<object>((a) =>
            {
                (a as Window).Close();
            });
            this.CloseWindowCommand.DoCanExecute = new Func<object, bool>((a) =>
            {
                return true;
            });
        }
    }
}
